/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.rs.manager.impl;

import java.util.Collection;
import java.util.List;

import com.xy.biz.rs.domain.po.ManufactureArchiveRecordPO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xy.biz.rs.domain.bo.ManufactureArchiveRecordBO;
import com.xy.biz.rs.domain.query.ManufactureArchiveRecordQuery;
import com.xy.biz.rs.domain.converter.ManufactureArchiveRecordConverter;
import com.xy.biz.rs.manager.ManufactureArchiveRecordManager;
import com.xy.biz.rs.dao.ManufactureArchiveRecordDao;

/**
 *
 *
 * @author wwj
 * @date 2021-4-19
 */
@Service
public class ManufactureArchiveRecordManagerImpl implements ManufactureArchiveRecordManager {

	@Autowired
	private ManufactureArchiveRecordDao manufactureArchiveRecordDao;

	@Override
	public int saveManufactureArchiveRecord(ManufactureArchiveRecordBO manufactureArchiveRecordBO) {
		return manufactureArchiveRecordDao.saveManufactureArchiveRecord(ManufactureArchiveRecordConverter.toPO(manufactureArchiveRecordBO));
	}

	@Override
	public int saveAllManufactureArchiveRecord(Collection<ManufactureArchiveRecordBO> collection) {
		return manufactureArchiveRecordDao.saveAllManufactureArchiveRecord(ManufactureArchiveRecordConverter.toPO(collection));
	}

	@Override
	public int updateManufactureArchiveRecord(ManufactureArchiveRecordBO manufactureArchiveRecordBO) {
		return manufactureArchiveRecordDao.updateManufactureArchiveRecord(ManufactureArchiveRecordConverter.toPO(manufactureArchiveRecordBO));
	}

	@Override
	public int deleteManufactureArchiveRecord(Long manufactureArchiveRecordId) {
		return manufactureArchiveRecordDao.deleteManufactureArchiveRecord(manufactureArchiveRecordId);
	}

	@Override
	public ManufactureArchiveRecordBO getManufactureArchiveRecord(Long manufactureArchiveRecordId) {
		return ManufactureArchiveRecordConverter.fromPO(manufactureArchiveRecordDao.getManufactureArchiveRecord(manufactureArchiveRecordId));
	}

	@Override
	public List<ManufactureArchiveRecordBO> listManufactureArchiveRecordById(Collection<Long> collection) {
		return ManufactureArchiveRecordConverter.fromPO(manufactureArchiveRecordDao.listManufactureArchiveRecordById(collection));
	}

	@Override
	public List<ManufactureArchiveRecordBO> listManufactureArchiveRecord(ManufactureArchiveRecordQuery query) {
		List<ManufactureArchiveRecordPO> manufactureArchiveRecordPOS = manufactureArchiveRecordDao.listManufactureArchiveRecord(query);
		return ManufactureArchiveRecordConverter.fromPO(manufactureArchiveRecordPOS);
	}

	@Override
	public int countManufactureArchiveRecord(ManufactureArchiveRecordQuery query) {
		return manufactureArchiveRecordDao.countManufactureArchiveRecord(query);
	}

}
